package com.example.jpatest.repository;

import com.example.jpatest.entity.Competition;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * @author czx
 */
public interface CompetitionRepository extends JpaRepository<Competition,Long> {
    /**
     * 通过名字查找
     */
    Optional<Competition> findByName(String name);
}
